use ruoubaly
go
create proc getAllLoaiByStatus
	@statu int
	as
	if(@statu=0)
		
			select * from loai where statu=0 order by loaiID
		
	else if(@statu=1)
		select * from loai where statu=1 order by loaiID
	else
		select * from loai order by loaiID

go
create proc getAllRuouByHomeAndXoa
@home int,
@xoa int
as
if(@xoa=0)
	select * from Ruou where xoa=0
	else if(@xoa=1)
	begin
		if(@home=0)
		select * from Ruou where xoa=1 and home=0
		else if(@home=1)	
		select * from Ruou where xoa=1 and home=1
		else
		select * from Ruou where xoa=1
	end
go

--[getAllLoaiByStatus]0
